<%@ page language="java" pageEncoding="UTF-8"%>
<!--  header -->
<%@ include file="../layouts/header.jsp" %>

<!--  body -->
<div class="Main">
  <div class="Main_fix">


   <%@ include file="../layouts/left.jsp" %>
	<script type="text/javascript">
			function removeItem(href,message){
				if(confirm(message)){
					window.location.href=href;
				}
			}
	</script>
	<!-- main body --> 	
  	<div class="Main_body" id="Main_body">
      <div class="Main_locationBar">
        <div class="Main_locationBar_head"></div>
        <div class="Main_locationBar_body">
        	<span id="CurrentPosition"><fmt:message key="project.name"/> > Site</span>
        </div>
        <div class="Main_locationBar_foot"></div>
      </div>
      
	  <div class="Main_bodyListBar">
        <div class="Main_bodyListBar_head">
        	<span>Site</span>
        </div>
        <div class="Main_bodyListBar_body">
            
           <%@ include file="../commons/message.jsp" %>
           <div id="listTable">
          <table border="0" cellspacing="0" cellpadding="0" class="listTable">
             <tr>                 
                <th>ID</th>
                <th>DomainName</th>
                <th>MaxUserCount</th>
                <th>Name</th>
                <th>Operation</th>
             </tr>
            <c:forEach var="site" items="${pageResult.list}">
  			 <tr>
  			  	<td>${site.id}</td>  			  
  			  	<td>${site.domainName}</td>
  			  	<td>${site.maxUserCount}</td>
  			  	<td>${site.name}</td>  			  	
  			  	<td>
  			  		<a href="<j:uri controller="site" action="show" id="${site.id}">  			  		       
  			  		         </j:uri>"><fmt:message key="form.button.show"/></a>
  			  		<a href="<j:uri controller="site" action="edit" id="${site.id}"/>"><fmt:message key="form.button.edit"/></a>
  			  		<a href="#" onclick="removeItem('<j:uri controller="site" action="delete" id="${site.id}"/>','<fmt:message key="message.confirm.delete"/>')"><fmt:message key="form.button.delete"/></a>
  			  	</td>
  			</tr>		   
    		</c:forEach>
    		<tr>
    			<td colspan="4" align="right">
    				<j:pn pageResult="${pageResult}"/>
    			</td>
    		</tr>
            </table> 
            </div>
        </div>
        <div class="Main_bodyListBar_foot"></div>       
      </div> 

	<div class="Main_buttonGroupBar_body">
		<input type="button" class="button" value="<fmt:message key="form.button.new"/>"  onclick="window.location = '<j:uri controller="site" action="create"/>'"/>
    </div>
  </div>
 </div>
 </div>
<!--  footer -->
<%@ include file="../layouts/footer.jsp" %>